package com.labofjet.repository.module2;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.repository.CrudRepository;

import com.labofjet.entity.Student;

public interface StudentRepository extends CrudRepository<Student, Long>{
	public Student findDistinctByName(String n);
	
	public List<Student> findStudentByPhonesPhoneName(String name);
	
	public List<Student> deleteStudentById(long id);
	
	public Page<Student> findAll(Pageable pageable);
	
	public List<Student> findByIdIn(List<Long> ids);
	
	public List<Student> findTop2By(Pageable pageable);
	
	public List<Student> findTop3ByOrderByName(Pageable pageable);
}
